<?php

class Default_Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

    private $_name = "default";

    public function _initAcl() {
        // Roles
        $registry = Zend_Registry::getInstance();
        $acl = $registry->get('acl');
        $this->initIndexAcl($acl);
    }

    /**
     * ACL for IndexController
     */
    public function initIndexAcl($acl) {
        // Resources
        $resources = $this->_name.':index';
        $acl->addResource($resources);
        $guests = array(
            'index'
        );
        $users = array(
            'login'
        );
        
        // ACL
        $acl->allow(Core_Role::ROLE_GUEST, $resources, $guests);
        $acl->allow(Core_Role::ROLE_USER, $resources, $users);
    }
}